<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
    <meta name="generator" content="Jekyll v4.0.1">
    <title>{% block title %}BabyLog!{% endblock %}</title>
    <link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" type="text/css">
    <link rel="stylesheet" href="{{ url_for('static', filename='plugins/font-awesome-4.7.0/css/font-awesome.min.css') }}" type="text/css">
    <script type="text/javascript" src="{{ url_for('static', filename='js/jquery.min.js') }}"></script>
</head>
<body style="padding-top: 3.5rem;">


    <body>
        <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
      <a class="navbar-brand" href="{{ url_for('index') }}">BabyLog</a>
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
    
      <div class="collapse navbar-collapse" id="navbarsExampleDefault">
        <ul class="navbar-nav mr-auto">
          <li class="nav-item">
            <a class="nav-link" href="{{ url_for('bloglist') }}">日志列表</a>
          </li>
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">添加数据</a>
            <div class="dropdown-menu" aria-labelledby="dropdown01">
              <a class="dropdown-item" href="{{  url_for('addBlog') }}">添加日志</a>
              <a class="dropdown-item" href="{{  url_for('addHealthy') }}">添加身高体重</a>
            </div>
          </li>
          <!-- 管理权限>=5才会显示 -->
          {% if current_user.is_authenticated  %}
            {% if current_user.gm >= 5 %}
            <li class="nav-item">
              <a class="nav-link" href="{{  url_for('adminindex') }}">管理数据</a>
            </li>
            {% endif %}
          {% endif %}


        </ul>
        {% if current_user.is_authenticated %}
        <a class="navbar-brand" href="{{ url_for('logout') }}">退出登录</a>
        {% endif %}
      </div>
    </nav>


    {% block content %}{% endblock %}
   
    
    <footer class="container text-center">
      <p class="text-success">任凭时光匆匆，记录点点滴滴。</p>
      <p>&copy; Powered by <a href="https://gitee.com/J_Sky/babylog" target="_blank" rel="noopener noreferrer">Flask-BabyLog</a> | Copyright  2017-2021 BabyLog</p>
      
    </footer>
<main class="container">




<script type="text/javascript" src="{{ url_for('static', filename='js/popper.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/script.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/app.js') }}"></script>
{{ moment.include_moment(local_js=url_for('static', filename='js/moment-with-locales.min.js')) }}
</body>
</html>
